![]() |
HidePen |
||||
Header: | Quickdraw.h | Carbon status: | Supported | |
Makes the graphics pen invisible, so that pen drawing doesn’t show on the screen.
void HidePen ();
The HidePen function is called by the OpenRgn, OpenPicture, and OpenPoly functions so that you can create regions, pictures, and polygons without drawing on the screen.
The HidePen function decrements the pnVis field of the current graphics port. The pnVis field is initialized to 0 by the OpenPort function. Whenever pnVis is negative, the pen does not draw on the screen. The pnVis field keeps track of the number of times the pen has been hidden to compensate for nested calls to the HidePen and ShowPen functions.
Every call to HidePen should be balanced by a subsequent call to ShowPen.
This pen-manipulation function uses the local coordinate system of the current graphics port. Remember that each graphics port has its own pen, the state of which is stored in several fields of its GrafPort or CGrafPort structure. If you draw in one graphics port, change to another, and return to the first, the pen for the first graphics port has the same state as when you left it.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)